package simulator;

/**
 * GameInit class bootstraps the entire game.
 * 
 * It first instantiates a ReactorUtils object that can create 
 * new plant objects.
 * The controller takes a reference to the ReactorUtils object 
 * so that it can get a new Plant if and when they're needed.
 * It also instantiates the UI and gives it a reference to
 * the controller for routing user commands. 
 *
 */
public class GameInit {
    
	//private TextUI view;
        public GraphicalUI view;
	public PlantController controller;
	
        public GameInit(boolean debugMode) {
            controller = new PlantController();
            view = new GraphicalUI(controller, debugMode);
            view.pack();
            view.setVisible(true);
        }
        
	public GameInit() {
		this(false);
	}        
        
        public PlantController getController(){
            return controller;
        }
        
        public GraphicalUI getGraphicalUI(){
            return view;
        }
        
	@SuppressWarnings("unused")
	public static void main(String[] args) {
		new GameInit(false);
	}
	
}